 package com.kwum.springcloud.cloud.microserviceconsumermovie;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
public class MicroserviceConsumerMovieApplication {
    
    /**
     * 用于在controller那一层的restTemplate初始化创建
     * 以controller调用的参数名字相同作为函数名称
     * 等同于 private RestTemplate restTemplate = new RestTemplate();
     * @return restTemplate
     * @author kwum
     */
    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

	public static void main(String[] args) {
		SpringApplication.run(MicroserviceConsumerMovieApplication.class, args);
	}
}
